import Vue from 'vue'
import VueRouter from 'vue-router'
import layout from '../layout/index.vue'
import layout2 from '../layout/index2.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: layout,
    name: '首页',
    iconCls: 'shouye',
    redirect: '/surey',
    children: [
      {
        path: '/surey',
        component: () => import(/* webpackChunkName: "[surey]" */'../views/surey/index.vue'),
        name: '概况',
        iconCls: 'gaikuang',
        meta: {
          title: '概况',
          leaf: false
        }
      },
      { path: '/support/allsupport', component: () => import(/* webpackChunkName: "[surey]" */'../views/surey/allSupport/index.vue'), name: '会议列表', meta: { title: '会议列表', leaf: false } }
    ]
  },
  {
    path: '/support',
    component: layout,
    name: '赞助',
    iconCls: 'zanzhu',
    redirect: '/support/index',
    children: [
      { path: '/support/index', component: () => import(/* webpackChunkName: "[support]" */'../views/support/index.vue'), name: '赞助', meta: { title: '赞助', leaf: false } },
      { path: '/support/apply', component: () => import(/* webpackChunkName: "[support]" */'../views/support/apply/index.vue'), name: '赞助申请', meta: { title: '赞助申请', leaf: false } },
      { path: '/support/report', component: () => import(/* webpackChunkName: "[support]" */'../views/support/report/index.vue'), name: '报告申请', meta: { title: '报告申请', leaf: false } },

      { path: '/support/meetingList', component: () => import(/* webpackChunkName: "[support]" */'../views/support/meetingList/index.vue'), name: 'reportList', meta: { title: '报告名单', leaf: false } },
      { path: '/support/supportPersonList', component: () => import(/* webpackChunkName: "[support]" */'../views/support/supportPersonList/index.vue'), name: '赞助', meta: { title: '赞助', leaf: false } }
    ]
  },
  {
    path: '/custoMade',
    component: layout,
    name: '定制',
    iconCls: 'dingzhi',
    redirect: '/custoMade/index',
    children: [
      { path: '/custoMade/index', component: () => import(/* webpackChunkName: "[custoMade]" */'../views/custoMade/index.vue'), name: '定制', meta: { title: '定制', leaf: false } },
      { path: '/custoMade/step', component: () => import(/* webpackChunkName: "[custoMade]" */'../views/custoMade/step/index.vue'), name: '创建定制', meta: { title: '创建定制', leaf: false } },
      { path: '/custoMade/step1', component: () => import(/* webpackChunkName: "[custoMade]" */'../views/selfCreate/create/step1.vue'), name: '创建厂商会', meta: { title: '创建厂商会', leaf: false } },
      { path: '/custoMade/drafts', component: () => import(/* webpackChunkName: "[custoMade]" */'../views/selfCreate/drafts/index.vue'), name: '草稿箱', meta: { title: '草稿箱', leaf: false } },
      { path: '/custoMade/broadcast', component: () => import(/* webpackChunkName: "[custoMade]" */'../views/selfCreate/broadcast/index.vue'), name: '待直播', meta: { title: '待直播', leaf: false } },
      { path: '/custoMade/endMeeting', component: () => import(/* webpackChunkName: "[custoMade]" */'../views/selfCreate/endMeeting/index.vue'), name: '直播结束', meta: { title: '直播结束', leaf: false } }
    ]
  },
  {
    path: '/selfCreate',
    component: layout,
    name: '自助',
    iconCls: 'ziban',
    redirect: '/selfCreate/selfMeting',
    children: [
      { path: '/selfCreate/selfMeting', component: () => import(/* webpackChunkName: "[selfCreate]" */'../views/selfCreate/selfMeting/index.vue'), name: '自助会议', meta: { title: '自助会议', leaf: false } },
      { path: '/selfCreate/step1', component: () => import(/* webpackChunkName: "[selfCreate]" */'../views/selfCreate/create/step1.vue'), name: '创建步骤一', meta: { title: '创建步骤一', leaf: false } },
      { path: '/selfCreate/step2', component: () => import(/* webpackChunkName: "[selfCreate]" */'../views/selfCreate/create/step2.vue'), name: '创建步骤二', meta: { title: '创建步骤二', leaf: false } },
      { path: '/selfCreate/broadcast', component: () => import(/* webpackChunkName: "[selfCreate]" */'../views/selfCreate/broadcast/index.vue'), name: '待直播', meta: { title: '待直播', leaf: false } },
      { path: '/selfCreate/drafts', component: () => import(/* webpackChunkName: "[selfCreate]" */'../views/selfCreate/drafts/index.vue'), name: '草稿箱', meta: { title: '草稿箱', leaf: false } },
      { path: '/selfCreate/endMeeting', component: () => import(/* webpackChunkName: "[selfCreate]" */'../views/selfCreate/endMeeting/index.vue'), name: '直播结束', meta: { title: '直播结束', leaf: false } }
    ]
  },
  {
    path: '/video',
    component: layout,
    name: '视频',
    iconCls: 'shipin',
    redirect: '/video/videolist',
    children: [
      {
        path: '/video/videolist', component: () => import(/* webpackChunkName: "[video]" */'../views/video/videoList/index.vue'), name: '视频列表', meta: { title: '视频列表', leaf: true }
      },
      { path: '/video/videolistadd', component: () => import(/* webpackChunkName: "[video]" */'../views/video/videoList/add.vue'), name: '新增/修改', ishidden: true, meta: { title: '新增/修改', leaf: true, parent: '/video/videolist' } },
      { path: '/video/questionmange', component: () => import(/* webpackChunkName: "[video]" */'../views/video/questionMange/index.vue'), name: '提问管理', meta: { title: '提问管理', leaf: true } },
      { path: '/video/videodata', component: () => import(/* webpackChunkName: "[video]" */'../views/video/videoData/index.vue'), name: '视频数据', meta: { title: '视频数据', leaf: true } },
      // { path: '/video/polyv', component: () => import(/* webpackChunkName: "[video]" */'../views/video/polyv/index.vue'), name: '外部视频', meta: { title: '外部视频', leaf: true } },
      { path: '/video/videolistShare', component: () => import(/* webpackChunkName: "[video]" */'../views/video/videoList/sharedUser.vue'), name: 'shareUser', ishidden: true, meta: { title: '搜全共享用户', leaf: true, parent: '/video/videolist' } },
      // { path: '/video/polyv', component: () => import(/* webpackChunkName: "[video]" */'../views/video/polyv/index.vue'), name: '保利威视频', meta: { title: '保利威视频', leaf: true } },
      { path: '/video/label', component: () => import(/* webpackChunkName: "[video]" */'../views/video/label/index.vue'), name: '视频标签', meta: { title: '视频标签', leaf: true } },
    ]
  },
  {
    path: '/user',
    component: layout,
    name: '用户',
    iconCls: 'yonghu',
    redirect: '/user/index',
    children: [
      { path: '/user/index', component: () => import(/* webpackChunkName: "[user]" */'../views/user/index.vue'), name: '用户', meta: { title: '用户', leaf: false } },
      { path: '/user/userDetail', component: () => import(/* webpackChunkName: "[user]" */'../views/user/userDetail.vue'), name: '用户详情', meta: { title: '用户详情', leaf: false } }
    ]
  },

  {
    path: '/account',
    component: layout,
    name: '账户',
    iconCls: 'zhanghu',
    redirect: '/account/index',
    children: [
      { path: '/account/index', component: () => import(/* webpackChunkName: "[account]" */'../views/account/index.vue'), name: '账户', meta: { title: '账户', leaf: false } }
    ]
  },
  // {
  //   path: '/message',
  //   component: layout,
  //   name: '消息',
  //   iconCls: 'zhanghu',
  //   redirect: '/message/index',
  //   children: [
  //     { path: '/message/index', component: () => import(/* webpackChunkName: "[request]" */'../views/message/index.vue'), name: '消息', meta: { title: '消息', leaf: false } }
  //   ]
  // },
  {
    path: '/tool',
    component: layout,
    name: '工具',
    iconCls: 'gongju',
    redirect: '/tool/questionnaire',
    children: [
      { path: '/tool/questionnaire', component: () => import(/* webpackChunkName: "[tool]" */'../views/tool/questionnaire/index.vue'), name: '问卷模板', meta: { title: '问卷模板', leaf: true } },
      { path: '/tool/addquestionnaire', component: () => import(/* webpackChunkName: "[tool]" */'../views/tool/questionnaire/add.vue'), ishidden: true, name: '新增模板', meta: { title: '新增模板', leaf: false } }
    ]
  },
  {
    path: '/specialist',
    component: layout,
    name: '专家',
    iconCls: 'zhuanjia',
    redirect: '/specialist/index',
    children: [
      { path: '/specialist/index', component: () => import(/* webpackChunkName: "[specialist]" */'../views/specialist/index.vue'), name: '专家管理', meta: { title: '专家管理', leaf: false } },
      { path: '/specialist/add', component: () => import(/* webpackChunkName: "[specialist]" */'../views/specialist/add.vue'), name: '添加专家', meta: { title: '添加专家', leaf: false } }
    ]
  },
  {
    path: '/setUp',
    component: layout,
    name: '设置',
    iconCls: 'shezhi',
    redirect: '/setUp/companyInformation',
    children: [
      // { path: '/setUp/companyInformation', component: () => import(/* webpackChunkName: "[setUp]" */'../views/setUp/companyInformation/index.vue'), name: '公司设置', meta: { title: '公司设置', leaf: true } },
      { path: '/setUp/companyInformation', component: () => import(/* webpackChunkName: "[setUp]" */'../views/setUp/index.vue'), name: '公司设置', meta: { title: '公司设置', name: 'companyInformation', leaf: true } },
      { path: '/setUp/employeeInformation', component: () => import(/* webpackChunkName: "[setUp]" */'../views/setUp/index.vue'), name: '员工信息', meta: { title: '员工信息', name: 'employeeInformation', leaf: true } },
      { path: '/setUp/brandPageSettings', component: () => import(/* webpackChunkName: "[setUp]" */'../views/setUp/index.vue'), name: '品牌页设置', meta: { title: '品牌页设置', name: 'brandPageSettings', leaf: true } }
      // { path: '/setUp/roleManagement', component: () => import(/* webpackChunkName: "[setUp]" */'../views/setUp/roleManagement/index.vue'), name: '角色管理', meta: { title: '角色管理', name: 'roleManagement', leaf: true } }
    ]
  },
  {
    path: '/login',
    name: '登录',
    component: () => import(/* webpackChunkName: "[login]" */'../views/login/index.vue')
  },
  {
    path: '/yhtMember',
    name: '仪会通会员介绍',
    component: () => import(/* webpackChunkName: "[yhtMember]" */'../components/yhtMember/index.vue')
  },
  {
    path: '/commontempelet',
    component: layout2,
    name: '账户设置',
    redirect: '/commontempelet/userinformatica',
    children: [
      { path: '/commontempelet/userinformatica', component: () => import(/* webpackChunkName: "[commontempelet]" */'../views/commontempelet/userInformatica/index.vue'), name: '账号设置', meta: { title: '账号设置', leaf: false } }
    ]
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
